import request from '@/utils/request'

export function addData(data) {
  return request({
    url: '/system/channel/add',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    },
  })
}

export function delData(ids) {
  return request({
    url: `/system/channel/remove/${ ids }`,
    method: 'delete',
  })
}

export function editData(data) {
  return request({
    url: '/system/channel/edit',
    method: 'put',
    data,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    },
  })
}

export function getData(params) {
  return request({
    url: '/system/channel/list',
    params,
  })
}
// 发件人信息添加

export function addAddress(data) {
  return request({
    url: '/order/address/info/add',
    method: 'post',
    data,
  })
}
export function getAddress() {
  return request({
    url: '/order/address/info/list',
    method: 'get',
   
  })
}

export function editAddress(data) {
  return request({
    url: '/order/address/info/edit',
    method: 'put',
    data,
  })
}

export function delAddress(ids) {
  return request({
    url: `/order//address/info/remove/${ ids }`,
    method: 'DELETE',
   
  })
}
// 打印下拉框
// 获取代码列表
export function getPrintConfig() {
  const params = { status: 0 }
  return request({
    url: '/system/printConfig/providerDropDownBox',
    method: 'get',
    params,
  })
}
